From 9807b9f09aa33077b74e30f05c1a0f67530a85ed Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 2 Mar 2007 16:00:22 +0000 Subject: [PATCH] linux: Use old-mode of save/restore for uniproc guests (it's faster). Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c index d8667b336a..ad6e4c54a5 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c @@ -210,6 +210,10 @@ int __xen_suspend(int fast_suspend) } #endif + /* If we are definitely UP then 'slow mode' is actually faster. */ + if (num_possible_cpus() == 1) + fast_suspend = 0; + if (fast_suspend) { xenbus_suspend(); err = stop_machine_run(take_machine_down, &fast_suspend, 0); -- 2.30.2